package com.xmg.design23.d5_adapter;

/**
 * @Author: mazhongqing
 * @Date: 2021/3/24 15:48
 */
public class USBLine {
    void charge(int volt){
        if(volt!=5){
            throw new IllegalArgumentException("电压不匹配");
        }
        System.out.println("开始充电");
    }
}
